<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>切换显示隐藏</title>

</head>
<body>
<script src="vue.global.js"></script>
<div id="app">
  <input type="button" value="切换显示隐藏" @click="fn">
    <div v-show="isShow">黑马程序员</div>
    <script>
        const app = Vue.createApp({
            data(){
                return{
                   isShow:false
                }
            },
            methods:{
                fn(){
                    this.isShow=!this.isShow
                }
            }
        }).mount('#app')
    </script>

 </div>
</body>
</html>
